var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, o, n) {
    var r, i = arguments.length, a = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a = Reflect.decorate(t, e, o, n); else for (var c = t.length - 1; 0 <= c; c--) (r = t[c]) && (a = (i < 3 ? r(a) : 3 < i ? r(e, o, a) : r(e, o)) || a);
    return 3 < i && a && Object.defineProperty(e, o, a), a;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("AudioManager"), s = e("PopBackItemView"), c = e("UIManager"), l = cc._decorator, d = l.ccclass, u = l.property, p = function(e) {
    function t() {
        var t = null !== e && e.apply(this, arguments) || this;
        return t.light = null, t.skeleton = null, t.sprite = null, t.mask = null, t;
    }
    return i(t, e), t.prototype.init = function() {
        cc.tween(this.light).repeatForever(cc.tween().by(2, {
            angle: 60
        })).start();
    }, t.prototype.callback = function() {
        var t = this;
        PD.checkNumParam("rank") ? (r.default.getInstance().playAudio("高级宝箱"), this.mask && (this.mask.active = !0), 
        this.sprite.node.active = !1, this.skeleton.node.active = !0, this.skeleton.setAnimation(0, "animation1", !1), 
        this.skeleton.setCompleteListener(function() {
            t.skeleton.setAnimation(0, "animation2", !1), t.skeleton.setCompleteListener(function() {
                c.default.getInstance().getPnl("start").appendEquip(PD.data.rank, 0), t.closePnl();
            });
        })) : this.closePnl();
    }, a([ u(cc.Node) ], t.prototype, "light", void 0), a([ u(sp.Skeleton) ], t.prototype, "skeleton", void 0), 
    a([ u(cc.Sprite) ], t.prototype, "sprite", void 0), a([ u(cc.Node) ], t.prototype, "mask", void 0), 
    a([ d ], t);
}(s.default);

n.default = p;